package en.tedu.mybatosannotatio.mapper;

import en.tedu.mybatosannotatio.pojo.User;
import en.tedu.mybatosannotatio.pojo.UserVo;
import en.tedu.mybatosannotatio.pojo.weiBoVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Insert("INSERT INTO user VALUES (null,#{username},#{password},#{nickname},#{created})")
    void  insert(User user);
    @Select("SELECT username, nickname  FROM user   ")
    List<UserVo> selectuser();
}
